Numerical control (NC) relates to the automation of machine tools that are operated by abstractly programmed commands encoded on a storage medium or mechanically automated via cams. Most of the current NC is computer numerical control (CNC), in which computers play an integral part of the control.
In modern CNC systems, end-to-end component design is highly automated using computer-aided design (CAD) and computer-aided manufacturing (CAM) programs. The programs produce a file that is interpreted to extract the commands needed to operate a particular machine via a postprocessor, and then loaded into the CNC machines for production. Typically, a numerically controlled machine is given a reference trajectory in the form of a sequence of points representing spatial coordinates of actuator positions or a mass to be moved. The CNC controls a movement of the mass to follow that trajectory, as well as possible, given physical constraints of the machine.
A motion controller operating a machining machine is one example of CNC. Lathes, grinders and coordinate measuring machines (CMMs) are other examples of manufacturing equipment which utilize a CNC for motion control. A three-axis CNC machining machine has a head where a tool is mounted and a table movable in the X. Y plane relative to the tool. Motors control motion of the table in the X and Y directions and motion of tool in the Z direction are according an orthogonal X, Y, Z Cartesian coordinate system. Positional sensors (typically encoders or scales) provide feedback indicating the position of the tool with respect to the coordinate system of the machining machine.
The CNC reads in a part program specifying a tool path trajectory that the tool is to follow at a specified velocity or feedrate. The tool motions are typically implemented using numerical control programming language, also known as preparatory code or G-Codes, see, e.g., the RS274D and DIN 66025/ISO 6983 standards. The controller continuously compares the current tool position with the specified tool path. Using this feedback, the controller generates signals to control motors in such a way that the tool's actual trajectory matches the input trajectory as closely as possible while the tool moves along the tool path at the desired velocity. The controller may be used in conjunction with a computer aided machining (CAM) system.
The trajectory and the corresponding G-Code are determined from a model of the desired outcome of the machining. After the trajectory is determined, the CNC does not have access to the original model and cannot compensate for any errors in the control. In addition, the trajectory information may not be an accurate representation of the desired machining, e.g., the trajectory may be corrupted by noise, excess quantization of the coordinates, under-sampling of the geometry of the model.
Therefore it is commonly necessary for the trajectory data to be reprocessed and resampled before being fed to the controller. Generally, this involves filtering and smoothing the sequence of the points. A number of conventional methods have been used to improve the input trajectory, including averaging, interpolating, fitting simple curves, and thresholds for rejection of outliers, see, e.g., U.S. Pat. Nos. 5,815,401, 7,444,202, and 5,723,961.
However, due to the limitation of the computational power of the CNC, the conventional methods process input trajectory locally, i.e., over small windows of data points. This leads to distinctly suboptimal results, because a small window may not include enough information to determine whether an outlying point represents a corner, a quantization artifact, a surplus motion, a sampling artifact, an undersampled change in curvature, or some other artifact.